package se.webbzon.boltzmann.game.sequence.builder;

import java.util.ArrayList;
import java.util.Collection;

import se.webbzon.boltzmann.factory.AbstractFactoryException;
import se.webbzon.boltzmann.game.object.dialogue.layout.ChoiceDialogueLayout;
import se.webbzon.boltzmann.game.object.dialogue.layout.DefaultChoiceDialogueLayout;
import se.webbzon.boltzmann.game.object.dialogue.layout.DefaultIntegerDialogueLayout;
import se.webbzon.boltzmann.game.object.dialogue.layout.DefaultItemDialogueLayout;
import se.webbzon.boltzmann.game.object.dialogue.layout.DefaultSimpleDialogueLayout;
import se.webbzon.boltzmann.game.object.dialogue.layout.IntegerDialogueLayout;
import se.webbzon.boltzmann.game.object.dialogue.layout.ItemDialogueLayout;
import se.webbzon.boltzmann.game.object.dialogue.layout.SimpleDialogueLayout;
import se.webbzon.boltzmann.game.sequence.builder.assignment.AssignmentRowInflator;
import se.webbzon.boltzmann.game.sequence.builder.condition.ConditionRowInflator;
import se.webbzon.boltzmann.game.sequence.builder.dialogue.ChoiceDialogueRowInflator;
import se.webbzon.boltzmann.game.sequence.builder.dialogue.IntegerDialogueRowInflator;
import se.webbzon.boltzmann.game.sequence.builder.dialogue.ItemDialogueRowInflator;
import se.webbzon.boltzmann.game.sequence.builder.dialogue.SimpleDialogueRowInflator;
import se.webbzon.boltzmann.game.sequence.builder.event.GameEventRowInflator;

public class DefaultSequenceRowInflatorGroup extends SequenceRowInflatorGroup {

	/*============================================================
	Constructors
	============================================================*/
	
	public DefaultSequenceRowInflatorGroup() throws AbstractFactoryException {
		super(makeInflators());
	}
	
	/*============================================================
	Private Methods
	============================================================*/
	
	private static final Collection<AbstractSequenceRowInflator> makeInflators() {
		ArrayList<AbstractSequenceRowInflator> inflators = 
				new ArrayList<AbstractSequenceRowInflator>();
		
		SimpleDialogueLayout sdl = new DefaultSimpleDialogueLayout();
		ChoiceDialogueLayout cdl = new DefaultChoiceDialogueLayout();
		IntegerDialogueLayout idl = new DefaultIntegerDialogueLayout();
		ItemDialogueLayout itdl = new DefaultItemDialogueLayout();
		
		// Add inflators to the collection
		inflators.add(new AssignmentRowInflator());
		inflators.add(new ConditionRowInflator());
		inflators.add(new GameEventRowInflator());
		inflators.add(new SimpleDialogueRowInflator(sdl));
		inflators.add(new ChoiceDialogueRowInflator(cdl));
		inflators.add(new IntegerDialogueRowInflator(idl));
		inflators.add(new ItemDialogueRowInflator(itdl));
		
		return inflators;
	}

}
